package edu.uic.cs.i422.s2011.team4;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class home extends Activity implements OnClickListener {
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);        
        setContentView(R.layout.home);
        
        Button formButton = (Button) findViewById(R.id.homeForm);
        formButton.setOnClickListener(this);
        
        Button uploadButton = (Button) findViewById(R.id.homeUpload);
        uploadButton.setOnClickListener(this);
	}
	
	public void onClick(View v) {
		Intent myIntent = null;
		switch(v.getId()) {
			case R.id.homeForm :
				myIntent = new Intent(v.getContext(), Form.class);
				break;
			case R.id.homeUpload :
				myIntent = new Intent(v.getContext(), FeedingObservation.class);
				break;
		}
    	startActivityForResult(myIntent, 0);
	} 
}